package com.yhp.util;

import java.util.List;

public class PageUtilPlus<T> {

    //将分页相关的数据定义在本类中
    private Integer pageIndex;//页码值
    private Integer pageSize=3;//每页显示条数
    private Integer totalCount;//总条数
    private Integer totalPages;//总页数
    private List<T> dataList;//查询的数据集合


    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    public Integer getTotalPages() {
        return totalCount%pageSize>0?totalCount/pageSize+1:totalCount/pageSize;
    }

    public void setTotalPages(Integer totalPages) {
        this.totalPages = totalPages;
    }

    public List<T> getDataList() {
        return dataList;
    }

    public void setDataList(List<T> dataList) {
        this.dataList = dataList;
    }
}
